<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/admin/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/admin/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<div class="layui-form layuimini-form">
    
    <form id="DataForm" action="" method="POST" class="layui-form layui-form-pane">
        <div class="layui-tab layui-tab-brief" lay-filter="itemTab">

            <table class="layui-table">
                <tbody>

                    <tr>
                        <td><span class="tdrow">编号：</span>{$info.on}</td>
                        <td><span class="tdrow">提现金额：</span>{$info.money}</td>
                        <td><span class="tdrow">审核人：</span>{$info.agent_name}</td>
                        <td><span class="tdrow">状态：</span>{$info.status_text}</td>
                        <td><span class="tdrow">真实姓名：</span>{$info.realname}</td>
                    </tr>
                    <tr>
                        <td><span class="tdrow">银行卡号：</span>{$info.bankcard}</td>
                        <td><span class="tdrow">开户行：</span>{$info.openbank}</td>
                        <td><span class="tdrow">创建时间：</span>{$info.addtime_text}</td>
                        <td><span class="tdrow">支付宝账号:</span>{$info.remarks}</td>
                        <td><span class="tdrow">备注：</span>{$info.alipay}</td>
                    </tr>
                    {if $info['status'] == 2}
                    <tr>
                        <td colspan="6"><span class="tdrow">驳回理由：</span>{$info.refuse_remarks}</td>
                    </tr>
                    {/if}
                </tbody>
            </table>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button id="saveButtonYes" type="submit" class="layui-btn layui-btn-normal"><i
                    class="fa fa-check"></i>
                通过</button>
                <button id="saveButtonNo" type="submit" class="layui-btn"><i class="fa fa-recycle"></i>
                驳回</button>
                <button id="closeButton" type="button" class="layui-btn layui-btn-primary"><i
                    class="fa fa-close"></i>
                关闭</button>
            </div>
        </div>
    </form>
</div>
<script src="/static/admin/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/admin/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
      layui.use(['layer', 'form', 'laydate', 'element', 'upload','wangEditor'], function () {

        var $ = layui.$, layer = layui.layer, table = layui.table,  element = layui.element,laydate = layui.laydate, form = layui.form, upload = layui.upload;
        var indexFrame = parent.layer.getFrameIndex(window.name); //获取窗口索引


        $("#closeButton").on('click', function () {
            parent.tableReload();
            parent.layer.close(indexFrame);
        })

        
        $("#saveButtonYes").on('click', function () {
                $.post("{:url('status')}", { id: "{$info.id}", audit: 'yes' },
                    function (data, textStatus, jqXHR) {
                        parent.tableReload();
                        layer.msg('操作成功');
                    }
                );
                return false;
            })

            
            $("#saveButtonNo").on('click', function () {
                layer.prompt({ title: '请输原因', formType: 2 }, function (text, index) {
                    if (parseFloat(text).toString().length <= 0) return false;
                    layer.close(index);
                    $.post("{:url('status')}", { audit: 'no', id: "{$info.id}", status_fail: text },
                        function (data, textStatus, jqXHR) {
                            layer.msg('操作成功');
                        }
                    );
                });
                return false;
            })
       

        });
</script>
</body>
</html>